/**
 * @summary: 评论展示
 * @author: lixinxiang@vv.cn
 */

import React from 'react';
import styles from './comment.less';

const Comment = ({ data }) => {
    const { userName, commentBody, commentDate, color } = data;
    // const isBeyond = commentBody.length > 200;
    // const finalContent = isBeyond ? `${commentBody.substring(0, 200)}...` : commentBody;
    return (
        <div className={styles.comment}>
            <div className={styles.time} style={{ color }}>
                {commentDate}
            </div>
            <div className={styles.name}>
                {userName} <span>回复</span>
            </div>
            {/* <div className={styles.email}>{userMail}</div> */}
            <div className={styles.content}>{commentBody}</div>
        </div>
    );
};

export default Comment;
